#ifndef _LT_LOG_H_
#define _LT_LOG_H_

#include <fstream>

namespace Lotus
{
	namespace Utilities
	{
		class LOTUS_API LineBreaker
		{
		friend class Log;
		public:
			~LineBreaker();
			template<typename T>
			LineBreaker& operator<<(const T& msg);
		private:
			LineBreaker(Log& log);
			Log& log;
		};

		class LOTUS_API Log
		{
		friend class LineBreaker;
		public:
			Log(const char* filePath);

			template<typename T>
			LineBreaker operator<<(const T& msg)
			{
				logFile<<msg;
				return *this;
			}
		private:
			std::fstream logFile;
		};
		
		template<typename T>
		LineBreaker& LineBreaker::operator<<(const T& msg)
		{
			log.logFile<<msg;
			return *this;
		}
	}
}

#endif